/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.webos.java.base.workspace;

import org.webos.java.root.RandomGUID;


/**
 *
 * @author kostya
 */
abstract public class WorkspaceItem {
    private String code = null;
    private WorkspaceItem parent = null;

    public WorkspaceItem(WorkspaceItem aParent) {
        code = new RandomGUID().toString();
        parent = aParent;
    }

    public WorkspaceItem(WorkspaceItem aParent, String aCode) {
        this(aParent);
        if(aCode!=null)
            this.code = aCode;
    }

    public WorkspaceItem getParent() {
        return parent;
    }

    public void setParent(WorkspaceItem parent) {
        this.parent = parent;
    }

    public String getCode() {
        return code;
    }

}
